package com.briup.jz.web.controller;

import com.briup.jz.bean.extend.RoleExtend;
import com.briup.jz.service.IRoleService;
import com.briup.jz.utils.Message;
import com.briup.jz.utils.MessageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ProjectName: jz
 * @Author: xjs
 * @Description: 角色接口
 * @Date: 2020/6/14 18:27
 */
@RestController
@RequestMapping("/role")
@Api(description = "角色业务接口")
public class RoleController {

    @Autowired
    private IRoleService iRoleService;

    @ApiOperation(value = "查找角色的所有权限")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id" ,value = "唯一编号" , required = true,paramType = "query")  //true代表这个属性必须填
    })
    @GetMapping("findAllPrivilege")
    public Message findAllPrivilege(Long id){
        return MessageUtil.success(iRoleService.selectAllPrivilege(id));
    }
}
